/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* 容器样式 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 登录页面样式 */
.login-container {
    width: 100%;
    max-width: 400px;
    margin: 100px auto;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.login-header {
    background-color: #4e6ef2;
    color: #fff;
    padding: 20px;
    text-align: center;
}

.login-form {
    padding: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* 按钮样式 */
.btn {
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
}

.btn-primary {
    background-color: #4e6ef2;
    color: #fff;
    /*width: 100%;*/
}

.btn-primary:hover {
    background-color: #3a56d4;
}

.btn-secondary {
    background-color: #f0f2f5;
    color: #333;
}

.btn-secondary:hover {
    background-color: #e5e6eb;
}

.btn-danger {
    background-color: #f53f3f;
    color: #fff;
}

.btn-danger:hover {
    background-color: #d93636;
}

/* 仪表盘样式 */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.app-header {
    background-color: #4e6ef2;
    color: #fff;
    padding: 0 20px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 20px;
    font-weight: bold;
}

.user-info {
    display: flex;
    align-items: center;
}

.user-info span {
    margin-right: 15px;
    font-weight: 500;
}

.username {
    padding: 5px 10px;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.1);
}

.app-body {
    display: flex;
    flex: 1;
}

.sidebar {
    width: 200px;
    background-color: #fff;
    border-right: 1px solid #eee;
}

.menu {
    padding: 15px 0;
    width: 100%;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.menu-item i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
    color: #4e6ef2;
}

.menu-item:hover, 
.menu-item.active, 
.menu-item.hover {
    background-color: #f0f2f5;
    color: #4e6ef2;
    padding-left: 25px;
    box-shadow: inset 3px 0 0 #4e6ef2;
}

/* 子菜单切换图标 */
.submenu-toggle-icon {
    margin-left: auto;
    transition: transform 0.3s ease;
}

.rotate-0 {
    transform: rotate(0deg);
}

.rotate-180 {
    transform: rotate(180deg);
}

.submenu {
    max-height: 0;
    overflow: hidden;
    background-color: #f7f8fa;
    padding-left: 20px;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.submenu.expanded {
    max-height: 1000px;
    opacity: 1;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 移除鼠标悬停自动展开子菜单的行为 */
/* .menu-group:hover .submenu { */
/*     display: block; */
/* } */

.submenu-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

.submenu-item i {
    margin-right: 10px;
    width: 16px;
    text-align: center;
    color: #666;
}

.submenu-item:hover {
    color: #4e6ef2;
    padding-left: 5px;
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
    display: none;
    padding: 10px 15px;
    background-color: #4e6ef2;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-bottom: 10px;
    transition: background-color 0.3s ease;
}

.mobile-menu-btn:hover {
    background-color: #3a56d4;
}

.content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #f5f7fa;
}

.welcome-page {
    text-align: center;
    padding: 50px 0;
}

.welcome-page h1 {
    font-size: 32px;
    margin-bottom: 15px;
    color: #4e6ef2;
}

/* 表格样式 */
.table-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.table th {
    background-color: #f7f8fa;
    font-weight: bold;
}

.table tr:hover {
    background-color: #f5f7fa;
}

/* 表单样式 */
.form-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
    padding: 20px;
}

/* 表单行布局 */
.form-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px 15px;
}

/* 响应式列布局 */
.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0 10px;
}

/* 表单标签样式 */
.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

/* 输入组样式 */
.input-group {
    display: flex;
    width: 100%;
}

.input-group-prepend {
    display: flex;
}

.input-group-text {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    margin-right: -1px;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    color: #495057;
    text-align: center;
    white-space: nowrap;
    background-color: #f0f2f5;
    border: 1px solid #ced4da;
    border-radius: 4px 0 0 4px;
}

/* 表单控件样式 */
.form-control {
    display: block;
    width: 100%;
    padding: 10px 15px;
    font-size: 14px;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0 4px 4px 0;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    color: #495057;
    background-color: #fff;
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* 无效输入样式 */
.invalid {
    border-color: #F44336;
}

.invalid:focus {
    border-color: #d93636;
    box-shadow: 0 0 0 0.2rem rgba(245, 63, 63, 0.25);
}

/* 必填字段标记 */
.required {
    color: #F44336;
}

/* 面包屑导航样式 */
.breadcrumb {
    display: flex;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    list-style: none;
    background-color: #f0f2f5;
    border-radius: 0.25rem;
    font-size: 14px;
}

.breadcrumb a {
    color: #4e6ef2;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb > li + li:before {
    padding: 0 5px;
    color: #6c757d;
    content: '>';
}

/* 页面标题样式 */
.page-header {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.page-header h1 {
    font-size: 24px;
    color: #333;
    margin-bottom: 10px;
}

/* 表格单元格内边距调整 */
.table th,
.table td {
    padding: 12px 15px;
    vertical-align: middle;
}

.form-title {
    font-size: 20px;
    margin-bottom: 20px;
    color: #333;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .app-body {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #eee;
    }

    .menu-group .submenu {
        display: block;
        padding-left: 10px;
    }
}

/* 卡片样式 */
.card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
    padding: 20px;
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.card-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.card-title {
    font-size: 18px;
    font-weight: bold;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.pagination-item {
    padding: 8px 12px;
    margin: 0 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.pagination-item.active {
    background-color: #4e6ef2;
    color: #fff;
    border-color: #4e6ef2;
}

/* 搜索框样式 */
.search-container {
    display: flex;
    margin-bottom: 20px;
}

.search-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
}

.search-btn {
    padding: 10px 15px;
    background-color: #4e6ef2;
    color: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

/* 详情页面样式 */
.detail-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
    padding: 20px;
}

.detail-item {
    margin-bottom: 15px;
}

.detail-label {
    font-weight: bold;
    margin-bottom: 5px;
    color: #666;
}

.detail-value {
    color: #333;
}

/* 操作按钮组 */
.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* 标签样式 */
.tag {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.tag-success {
    background-color: #00b42a;
    color: #fff;
}

.tag-warning {
    background-color: #ff7d00;
    color: #fff;
}

.tag-danger {
    background-color: #f53f3f;
    color: #fff;
}

.tag-info {
    background-color: #86909c;
    color: #fff;
}